Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/asset/installconfig: Add _CI_ONLY_STAY_AWAY_OPENSHIFT_INSTALL_AWS_USER_TAGS #364

Merged

Conversation

wking
Copy link
Member

@wking wking commented Sep 28, 2018

With a JSON string containing the intended values.

This is probably not how we're going to expose this long-term, so I'm not documenting the enviroment variable yet. But I want this so we can get back to tagging expirationData in CI, without waiting for asset state <-> disk (de)serialization.

I've also adjusted installconfig to pass platforms as JSON instead of as an array of strings. This makes it much easier to add control over additional properties, because the consuming logic remains "just unpack the JSON into the appropriate structure". This may conflict with #344, but it's a small enough change that rebasing either way should be easy. CC @staebler.

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 28, 2018
Instead of as an array of strings.  This makes it much easier to add
control over additional properties, because the consuming logic
remains "just unpack the JSON into the appropriate structure".
@wking wking force-pushed the platform-asset-state-as-json branch from adf12e9 to 931cfa3 Compare September 28, 2018 07:29
@abhinavdahiya
Copy link
Contributor

@wking This is definitely useful.
But generally cleanup script should not depend on people to label correctly;
Rather the cleanup scripts should tag everything not tagged to an expiry and cleanup everything expired.

@@ -162,6 +163,12 @@ func (a *Platform) awsPlatform() (*asset.State, error) {
}
platform.Region = string(region.Contents[0].Data)

if value, ok := os.LookupEnv("OPENSHIFT_INSTALL_AWS_USER_TAGS"); ok {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep track of these internal MAGIC envs. This might get lost.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep track of these internal MAGIC envs.

Does the rename address this concern?

…_USER_TAGS

With a JSON string containing the intended values.

This is not how we're going to expose this long-term, so I'm using an
embarrassing name and not documenting the enviroment variable.  But I
want this so we can get back to tagging expirationData in CI, without
waiting for asset state <-> disk (de)serialization.
@wking wking changed the title pkg/asset/installconfig: Add OPENSHIFT_INSTALL_AWS_USER_TAGS pkg/asset/installconfig: Add _CI_ONLY_STAY_AWAY_OPENSHIFT_INSTALL_AWS_USER_TAGS Sep 28, 2018
@wking wking force-pushed the platform-asset-state-as-json branch from 931cfa3 to 98a3531 Compare September 28, 2018 17:22
@wking
Copy link
Member Author

wking commented Sep 28, 2018

I've pushed 931cfa3 -> 98a3531 to give this a more embarassing name, so it's more obvious for folks grepping the source that this is not going to be the stable way to inject this information (the stable approach is going to be creating your own install-config YAML and feeding that into openshift-install instead of using the openshift-install install-config wizard).

@abhinavdahiya
Copy link
Contributor

/approve

@crawford
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 28, 2018
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, crawford, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,crawford,wking]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 2e5407b into openshift:master Sep 28, 2018
wking added a commit to wking/openshift-installer that referenced this pull request Sep 28, 2018
@wking wking deleted the platform-asset-state-as-json branch September 29, 2018 05:26
wking added a commit to wking/openshift-release that referenced this pull request Oct 4, 2018
We'd dropped this in 3f2f01c
(ci-operator/config/openshift/installer/master: Move to
openshift-install, 2018-09-26, openshift#1677).  But since
openshift/installer@98a35316 (pkg/asset/installconfig: Add
_CI_ONLY_STAY_AWAY_OPENSHIFT_INSTALL_AWS_USER_TAGS, 2018-09-28,
openshift/installer#364), the installer supports setting it again, so
we can add it back.

As the name suggests, this variable is not a stable API.  Soon the new
installer will be able to load the configuration from YAML (again),
but we can keep adjusting as the installer evolves.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants